@isTest
private class StockDetailsWebserviceTest {
	//测试科研样品
    static testMethod void testMethod1() {


    	Account acc = TestUtils.createAccount();
    	acc.Level__c = '一级医院';
    	acc.AccountNumber = '123456';
    	insert acc;

    	Product__c p1 = TestUtils.createProduct();
        p1.Category0__c = '试剂';
        p1.PriceCompany__c = 'MKSY';
        p1.NCCode__c = '000001';
        p1.RecordTypeId = Utils.getRecordTypeIdByDevNameAndObjName('NCProduct', 'Product__c');

        insert p1;

        

    	GiftApplication__c ga = new GiftApplication__c();
    	ga.Company__c = [select SubCompany__c from User where Id =:UserInfo.getUserId()].SubCompany__c;
    	ga.States__c = '已批准';

    	insert ga;

    	GiftApplicationDetails__c gad = new GiftApplicationDetails__c();
    	gad.Product__c = p1.Id;
    	gad.GiftApplication__c = ga.Id;
    	gad.Quantity__c = 1;
    	gad.Remark__c = 'test';

    	insert gad;


    	StockDetailsWebservice.postGiftApplication(ga.Id);


    }
}